home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.7 KB | 132 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: CMovie.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Lonnie Millett
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef CMOVIE_H
- #define CMOVIE_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWGRDEF_H
- #include "FWGrDef.h"
- #endif
-
- #ifndef _ODTYPESF_
- #include <ODTypesF.h>
- #endif
-
- #if defined(FW_BUILD_MAC) && !defined(__MOVIES__)
- #include <Movies.h>
- #endif
-
- //----------------------------------------------------------------------------------------
- // Forward declarations
- //----------------------------------------------------------------------------------------
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import on
- #endif
- class FW_CLASS_ATTR FW_CRect;
- class FW_CLASS_ATTR FW_CFileSpecification;
- class FW_CLASS_ATTR FW_CMouseEvent;
- class FW_CLASS_ATTR FW_CVirtualKeyEvent;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import off
- #endif
-
- class FW_CLASS_ATTR CMovie FW_AUTO_DESTRUCT_OBJECT
- {
- public:
- CMovie();
- CMovie(Movie theAdoptedMovie);
- CMovie(const CMovie& other);
- virtual ~CMovie();
-
- CMovie& operator=(const CMovie& other);
- operator Movie();
-
- void MakeControllerVisible(FW_Boolean visible);
-
- void GetBoundingBox(FW_CRect& boundingBox);
- void SetBoundingBox(const FW_CRect& boundingBox);
- void SetGraphicsWorld(ODPlatformWindow platformWindow);
- void SetClipShape(ODRgnHandle clipRegion);
-
- void Draw(ODPlatformWindow platformWindow);
-
- void Idle();
- FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
- FW_Boolean DoVirtualKeyDown(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
-
- void Activate(ODPlatformWindow platformWindow, FW_Boolean activate);
- void Start();
- void Stop();
-
- void SetLooping(FW_Boolean loop);
- void EnableKeys(FW_Boolean enabled);
- void EnableEditing(FW_Boolean enabled);
- void EnableDragging(FW_Boolean enabled);
-
- FW_Boolean IsLooping();
- FW_Boolean AreKeysEnabled();
- FW_Boolean IsEditingEnabled();
- FW_Boolean IsDragEnabled();
- FW_Boolean IsPlaying();
-
- void GetCurrentSelection(TimeValue* currentTime, TimeValue* duration) const;
- void SetCurrentSelection(TimeValue currentTime, TimeValue duration);
- void ClearCurrentSelection();
- void ClearSelection(TimeValue currentTime, TimeValue duration);
- void CloseSelection();
- FW_Boolean IsSelectionEmpty();
- void SelectAll();
- Movie CopySelection();
- FW_PlatformHandle CopyCurrentSelectionToHandle();
-
- FW_PlatformHandle GetAsHandle();
- FW_PlatformPict GetAsPict();
-
- void PasteMovieToSelection(CMovie* newMovie, TimeValue currentTime, TimeValue duration);
- void PasteMovieToCurrentSelection(CMovie* newMovie);
- void PasteHandleToSelection(FW_PlatformHandle newHandle, OSType handleType, TimeValue currentTime, TimeValue duration);
- void PasteHandleToCurrentSelection(FW_PlatformHandle newHandle, OSType handleType);
-
- // Static methods
- static FW_Boolean InitializeQuickTime();
- static void TerminateQuickTime();
-
- // Factory methods
- static CMovie* CreateNewMovieFromFile(const FW_CFileSpecification& movieFile);
- static CMovie* CreateNewMovieFromHandle(FW_PlatformHandle movieHandle);
-
- private:
- Movie fMovie;
- MovieController fMovieController;
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CMovie::operator Movie
- //----------------------------------------------------------------------------------------
- inline CMovie::operator Movie()
- {
- return fMovie;
- }
-
-
- #endif
-
-
-